package com.woniuxy02;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-10-24 15:51
 */
public class Test05 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入班级人数");
        int num = scanner.nextInt();
        int[] scores=new int[num];
        int total=0,avg;
        for(int i=0;i<scores.length;i++){
            System.out.println("输入第"+(i+1)+"个人的成绩");
            scores[i]=scanner.nextInt();
            total+=scores[i];
        }
        avg=total/scores.length;
        System.out.println("学生成绩:");
        for(int i=0;i<scores.length;i++){
            System.out.print(scores[i]+"\t");
        }
        System.out.println();
        System.out.println("总分："+total);
        System.out.println("总分："+avg);
    }
}
